package com.yz.lzq.liwushuo.base;

import android.os.Bundle;
import android.support.v4.widget.CompoundButtonCompat;
import android.support.v4.widget.TextViewCompat;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;


/**
 * Created by wanggang on 2016/11/14.
 */

public abstract class BaseActivity extends AppCompatActivity {


   private BaseCommPresenter presenter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //定义Activity样式
        //定义Activity栈
        //LayoutinflaterFactory
        //TextView
        //TextViewCompat
        presenter=initPresenter();
    }


    public abstract BaseCommPresenter initPresenter();





    @Override
    protected void onResume() {
        super.onResume();
        //加上统计代码
    }

    @Override
    protected void onPause() {
        super.onPause();
        //加上统计代码
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if(presenter!=null){
            presenter.unSub();
        }
    }
}
